//
//  AipuTelViewController.m
//  AipuTel
//
//  Created by cretve on 15/1/19.
//  Copyright (c) 2015年 aipu. All rights reserved.
//

#import "AipuTelViewController.h"

@interface AipuTelViewController ()

@end

@implementation AipuTelViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
}

@end

@implementation UIImage (WhiteMask)

- (UIImage*)imageWithWhiteMask
{
    CGRect rect = CGRectMake(0, 0, self.size.width, self.size.height);
    UIGraphicsBeginImageContextWithOptions(rect.size, NO, self.scale);
    CGContextRef c = UIGraphicsGetCurrentContext();
    [self drawInRect:rect];
    CGContextSetFillColorWithColor(c, [[UIColor whiteColor] CGColor]);
    CGContextSetBlendMode(c, kCGBlendModeSourceAtop);
    CGContextFillRect(c, rect);
    UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return result;
}

@end
